#include<stdio.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<unistd.h>
#include<fcntl.h>


int main()
{
    int fd1 = open("now.txt", O_WRONLY | O_CREAT | O_TRUNC, 0666);
    printf("fd1: %d\n", fd1);
    return 0;
}











//#define ONE (1<<0)
//#define TWO (1<<1)
//#define THREE (1<<2)
//
//void PrintTest(int flags)
//{
//    if (flags & ONE)
//    {
//        printf("one\n");
//    }
//    if (flags & TWO)
//    {
//        printf("two\n");
//    }
//    if (flags & THREE)
//    {
//        printf("three\n");
//    }
//}
//
//int main()
//{
//    printf("===============================\n");
//    PrintTest(ONE);
//    printf("===============================\n");
//    PrintTest(TWO);
//    printf("===============================\n");
//    PrintTest(THREE);
//    printf("===============================\n");
//    PrintTest(ONE | THREE);
//    printf("===============================\n");
//    PrintTest(ONE | TWO | THREE);
//    printf("===============================\n");
//    return 0;
//}
